package user;

/**
 * Creared with IntelliJ IDEA.
 * Description:
 * User:yxd
 * Date:2022-01-05
 * Time:2:11
 */

import operation.*;

import java.util.Scanner;

public class AdminUser extends User{//管理员

    public AdminUser(String name) {//构造方法
        super(name);
        this.iOperation = new IOperation[]{//包含各种操作
                new ExitOperation(),
                new FindOperation(),
                new AddOperation(),
                new DelOperation(),
                new DispalyOperation()


        };
    }

    public int menu(){
        System.out.println("=====管理员菜单=====");
        System.out.println("Hello  " + this.name + "欢迎来到图书系统");
        System.out.println("1.查找图书");
        System.out.println("2.新增图书");
        System.out.println("3.删除图书");
        System.out.println("4.显示图书");
        //System.out.println("5.修改图书");

        System.out.println("0.退出菜单");
        System.out.println("==================");
        Scanner input  = new Scanner(System.in);
        int choice = input.nextInt();
        return choice;//返回用户的选择

    }
}

